package lqb;

public abstract  class TaskExecutor {
    private int executionCount = 0; // 共享的状态



    void execute() {
        executionCount++;
        System.out.println("Executing task #" + executionCount);
        runTask();
    }

    abstract void runTask();

}
